﻿namespace Hidistro.UI.SaleSystem.CodeBehind
{
    using Hidistro.Membership.Context;
    using Hidistro.UI.Common.Controls;
    using System;
    using System.Web.UI;
    using System.Web.UI.HtmlControls;

    [ParseChildren(true)]
    public class WAPUserInfo : WAPMemberTemplatedWebControl
    {
        protected override void AttachChildControls()
        {
            HtmlInputText control = (HtmlInputText) this.FindControl("txtUserName");
            HtmlInputText text2 = (HtmlInputText) this.FindControl("txtRealName");
            HtmlInputText text3 = (HtmlInputText) this.FindControl("txtPhone");
            HtmlInputText text4 = (HtmlInputText) this.FindControl("txtEmail");
            Member user = HiContext.Current.User as Member;
            if (user != null)
            {
                control.SetWhenIsNotNull(user.Username);
                text2.SetWhenIsNotNull(user.RealName);
                text3.SetWhenIsNotNull(user.CellPhone);
                text4.SetWhenIsNotNull(user.QQ);
            }
            PageTitle.AddSiteNameTitle("修改用户信息");
        }

        protected override void OnInit(EventArgs e)
        {
            if (this.SkinName == null)
            {
                this.SkinName = "skin-VUserInfo.html";
            }
            base.OnInit(e);
        }
    }
}

